;
(function (window, $, undefined) {
    $.fn.createTab = function (opt) {
        var def = {
            activeEvt: 'click',
            activeCls: 'cur'
        }
        $.extend(def, opt);
        this.each(function () {
            var $this = $(this);
            $this.on('click', 'ul.title li', function () {
                var index = $(this).index(),
                    that = $(this);
                that.addClass('cur').siblings().removeClass('cur');
                $this.find('div.list').stop().animate({
                    marginLeft: -1000 * index
                }, 'slow');
            })
        });
    }
})(window, jQuery);